import request from '@/utils/request'

//商户积分发放申请列表
export function assetApplyList(params) {
    return request({
        url: '/platform/merchant/asset/apply/list',
        method: 'get',
        params
    })
}

// 新增商户积分申请
export function addAssetApply(data) {
    return request({
        url: '/platform/merchant/asset/apply',
        method: 'post',
        data
    })
}

// 保存商户积分发放
export function assetApplyAddIssue(data) {
    return request({
        url: '/platform/merchant/asset/apply/addIssue',
        method: 'post',
        data
    })
}

// 编辑商户积分发放
export function assetApplyEditIssue(data) {
    return request({
        url: '/platform/merchant/asset/apply/editIssue',
        method: 'put',
        data
    })
}
// 删除商户积分发放
export function assetApplyDelIssue(id) {
    return request({
        url: `/platform/merchant/asset/apply/issue/${id}`,
        method: 'delete',
    })
}

// 执行发放
export function assetApplyIssueExecute(applyId) {
    return request({
        url: `/platform/merchant/asset/apply/issue/execute/${applyId}`,
        method: 'get',
    })
}

// 商户积分发放列表(发放积分列表与发放明细列表共用该接口)
export function assetApplyIssueInfoList(params) {
    return request({
        url: '/platform/merchant/asset/apply/issueInfoList',
        method: 'GET',
        params
    })
}

// 商户下拉框选择列表
export function assetApplySelectShopList() {
    return request({
        url: '/platform/merchant/asset/apply/selectShopList',
        method: 'GET',
    })
}

